<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>创建房间</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="layui/css/modules/layer/default/layer.css">
</head>
<body>
    <table id="roomTbl" lay-filter="roomTbl"></table>

    <script type="text/html" id="roomTblOps">
        <div class="layui-btn-container">
            <a class="layui-btn layui-btn-sm" lay-event="addRoom" href="/chatroom/chatroom.html?roomId={{ d.id }}">加入房间</a>
            <button class="layui-btn layui-btn-sm" lay-event="deleteRoom">删除房间</button>
        </div>
    </script>
    <script type="text/html" id="roomTblToolbar">
        <div class="layui-btn-container">
            <button class="layui-btn layui-btn-sm" lay-event="addRoom">添加房间</button>
        </div>
    </script>
    <script type="text/html" id="addRoomFormScript">
        <form id="addRoomForm" class="layui-form" lay-filter="addRoomForm" style="margin-top: 20px">
            <div class="layui-form-item">
                <label class="layui-form-label">房间标题</label>
                <div class="layui-input-inline">
                    <input  type="text" name="description" required placeholder="请输入房间标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">房间描述</label>
                <div class="layui-input-inline">
                    <input  type="text" name="description" required placeholder="请输入房间描述" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">直播密钥</label>
                <div class="layui-input-inline">
                    <input  type="text" name="secret_key" disabled autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">直播封面</label>
                <div class="layui-input-block">
                    <span id="cover-span"></span>
                    <input  type="text" name="cover" hidden="hidden" class="layui-input">
                    <button type="button" class="layui-btn" id="upload-head-img">
                        <i class="layui-icon">&#xe67c;</i>上传图片
                    </button>
                </div>
            </div>
        </form>
    </script>
    <script src="js/index.js" type="application/javascript"></script>
    <script src="layui/layui.js" type="application/javascript"></script>
    <script src="js/roomPage.js" type="application/javascript"></script>
</body>
</html>